<?php 
$isadmin=1;
include "../../comm/tuaninc.php";
include('../check.php');

$sql="select id,name from ".$duoduo->BIAOTOU."mall where catid = ".TUANCID." and api_url is not null and api_url<>'' order by sort desc";
$malls=$duoduo->sqltoarr($sql);
if($_POST['sub']){
    $mallid=implode(',',$_POST['mallid']);
	admin_log('采集团购商品');
	$duoduo->alert('开始采集','../../comm/collect.php?mallid='.$mallid);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理中心</title>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
table,tr,td { font-size:12px;}
table a { text-decoration:none; color:#FF6600}
table a:visted { color:#FF66CC; text-decoration:none}
.STYLE1 {color: #FF6600}
-->
</style>
</head>
<body topmargin="5" leftmargin="0">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr>
    <td height="282" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>
          <table cellspacing="0" width="100%" height="207" style="border:1px  solid #DCEAF7;">
            <tr>
              <td height="30" colspan="2" bgcolor="E9F2FB" class="bigtext"><strong>&nbsp;<img src="../images/arrow.gif" width="16" height="22" align="absmiddle" /> 团购采集</strong></td>
            </tr>
            <tr>
              <td width="100%" colspan="2" valign="top"><table width="100%" height="300" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td valign="top" style=" padding-left:20px">
                  <div style="float:left; width:440px">
                  <form id="form1" name="form1" method="post" action="goods_collect.php" style="position:relative;top:5px">
                  <div style="float:left">
                  <select name="mallid[]" multiple style="height:300px">
                    <?php foreach($malls as $row){?>
                    <option value="<?=$row['id']?>"><?=$row['name']?></option>
                    <?php }?>
                      </select>
                  </div>
                  <div style="float:left;margin-left:10px">
                  <div style=" height:250px; font-weight:bold; color:#F00; font-size:14px; width:300px">注意：美团，拉手带有城市api的网站，需要在保存商城后，修改网站，点击生成城市缓存，否则无法采集！</div>
                  <div><input type="submit" value="采集提交" name="sub" /></div>
                  </div>
                    
                  </form>
                  <div style="clear:both; height:10px">&nbsp;</div>
                  <div>按住ctrl或者shift可多选</div>
                  </div>
                  <div style="float:left">
                  <form id="form1" name="form1" method="get" action="delmallgoods.php" style="position:relative;top:5px">
                  <div style="float:left">
                  <select name="mallid[]" multiple style="height:300px">
                    <?php foreach($malls as $row){?>
                    <option value="<?=$row['id']?>"><?=$row['name']?></option>
                    <?php }?>
                      </select>
                  </div>
                  <div style="float:left;margin-left:10px">
                  <div style=" height:250px; font-weight:bold; color:#F00; font-size:14px; width:300px">选中商城，删除此商城的团购商品。</div>
                  <div><input type="submit" value="删除提交" name="sub" /></div>
                  </div>
                    
                  </form>
                  <div style="clear:both; height:10px">&nbsp;</div>
                  <div>按住ctrl或者shift可多选</div>
                  </div>
                  </td>
                 
                </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
      
    </table></td>
  </tr>
</table>
</div>
</body>
</html>
